#include <cstdio>
#include <cmath>
using namespace std;

int main()
{
    double pi = 0, term;
    for (int i = 0; ; i++) {
        term = 1 / (2 * (double)i + 1);
        if (term < 1e-6)
            break;
        pi += pow(-1, i) * term * 4;
    }
    printf("PI=%.8f\n", pi);
    return 0;
}